/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.sim.warpper;

import cn.iot.card.open.constants.Constants;
import cn.iot.card.open.constants.factory.ConstantFactory;
import cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper;
import cn.stylefeng.roses.kernel.model.page.PageResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;
import java.util.Map;

/**
 * 物联卡综合信息，GPRS信息包装类
 *
 * @author zhanlele
 * @date 20200319 15:21:51
 * @modify 20200319 zhanlele v1.1.2 创建
 * @since v1.1.2
 */
public class SimInfoForGprsWrapper extends BaseControllerWrapper {

    public SimInfoForGprsWrapper(Map<String, Object> single) {
        super(single);
    }

    public SimInfoForGprsWrapper(List<Map<String, Object>> multi) {
        super(multi);
    }

    public SimInfoForGprsWrapper(Page<Map<String, Object>> page) {
        super(page);
    }

    public SimInfoForGprsWrapper(PageResult<Map<String, Object>> pageResult) {
        super(pageResult);
    }

    @Override
    protected void wrapTheMap(Map<String, Object> map) {
        map.put(Constants.ONLINE_STATUS, ConstantFactory.me().getCardOnlineStatus((String) map.get(Constants.ONLINE_STATUS)));
        map.put(Constants.RAT_TYPE, ConstantFactory.me().getCardOnlineStatus((String) map.get(Constants.RAT_TYPE)));
        map.put(Constants.SERVICE_STATUS, ConstantFactory.me().getCardApnStatus((String) map.get(Constants.SERVICE_STATUS)));
    }
}
